Manually upgrading an outdated OBS from aports on Alpine Linux

taking matters into my own hands

Home About Projects Blog Games Contact Support

While I enjoy daily driving an Alpine Linux desktop and using the latest edge repos and linux kernel, sometimes packages aren't updated when I'd like them to be. Thankfully aports and abuild, along with apk, allow using locally built packages in place of the main repository versions.

Read & Follow this page first!

https://wiki.alpinelinux.org/wiki/CreatinganAlpine_package

I followed the section "Setup your system and account" before doing the below commands and edits. Technically I did that after messing up a lot and resetting things with abuild cleanpkg, but yeah, make the keys and things and get your user and everything all setup first to reduce headaches.

tl;dr

doas apk add alpine-sdk
git clone https://github.com/alpinelinux/aports
# or use their non-mirrored gitlab repo, but I didn't plan to upstream my changes if they
#   didn't work 

# Change this to wherever you cloned the aports repo
cd aports/community/obs-studio

# Update APKBUILD file to bump the pkgver to latest (30.2.0 as of 2024-07-13)
pkgver=30.2.0
pkgrel=0

# Update APKBUILD file to add these dependencies (one per line) under the "makedepends=" section:
# uthash-dev
# ffnvcodec-headers
# nlohmann-json

# Update checksums at bottom of APKBUILD file
abuild checksum

# This does the build/install/other cleanup and things for the package
abuild -r

# Edit /etc/apk/repositories 
# e.g. this is how my apk repos looked after adding the new local repo for aports
#  at ~/queso/packages/community (use your own user, not queso):
#
# $ cat /etc/apk/repositories
# /home/queso/packages/community/
# http://dl-cdn.alpinelinux.org/alpine/edge/main
# http://dl-cdn.alpinelinux.org/alpine/edge/community
# http://dl-cdn.alpinelinux.org/alpine/edge/testing

# Get new repo indexes, including your new local repository
apk update

# Upgrade OBS (and other packages) to newly available versions
#  for me this resulted in going from OBS 30.1.2-r0 to 30.2.0-r0
apk upgrade

# OBS should now work and be updated to your newly built latest version